Repository navigation
fix(comments): unreact, resolve and own-comment delete answer on a kernel with no http.server - #36539
Conversation
…-neutrally on the comments slot Claude-Session: https://claude.ai/code/session_01ADHkmRY38EZf38Yy3zthbY Co-authored-by: Claude <noreply@anthropic.com>
…a kernel with no http.server Claude-Session: https://claude.ai/code/session_01ADHkmRY38EZf38Yy3zthbY Co-authored-by: Claude <noreply@anthropic.com>
…nt doors to the comments slot Claude-Session: https://claude.ai/code/session_01ADHkmRY38EZf38Yy3zthbY Co-authored-by: Claude <noreply@anthropic.com>
…declares the /comments domain Claude-Session: https://claude.ai/code/session_01ADHkmRY38EZf38Yy3zthbY Co-authored-by: Claude <noreply@anthropic.com>
…ers classify the /comments domain The http-conformance boot composes AuditPlugin with and without an http.server and pins byte parity between the two doors, and a typed 501 when the comments service is absent. The authz matrix classifies the new /comments ledger rows; the live-mount parity boot pins them as unexercised because it composes no AuditPlugin. Claude-Session: https://claude.ai/code/session_01ADHkmRY38EZf38Yy3zthbY Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ADHkmRY38EZf38Yy3zthbY Co-authored-by: Claude <noreply@anthropic.com>
… the affected-docs walk does not read it as a spec API declaration Claude-Session: https://claude.ai/code/session_01ADHkmRY38EZf38Yy3zthbY Co-authored-by: Claude <noreply@anthropic.com>
…r to source, comments domain test pays the metadata load at collection, conformance findOne options typed Claude-Session: https://claude.ai/code/session_01ADHkmRY38EZf38Yy3zthbY Co-authored-by: Claude <noreply@anthropic.com>
…s the door's caller resolution reads Claude-Session: https://claude.ai/code/session_01ADHkmRY38EZf38Yy3zthbY Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ADHkmRY38EZf38Yy3zthbY Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 4 package(s): 7 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 4 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 182 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin bf47c34cdf2f4943602c61c219d58600031229cb && git checkout bf47c34cdf2f4943602c61c219d58600031229cb
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 77517533d3b8fd8aafb2f4203ba384e31c3ae7cf e7dcb26cc49a8cb61a3cddb0104b0371e7ffb7a8 && git checkout -B drift-repro 77517533d3b8fd8aafb2f4203ba384e31c3ae7cf && git merge --no-ff e7dcb26cc49a8cb61a3cddb0104b0371e7ffb7a8
node scripts/docs-audit/affected-docs.mjs --json 77517533d3b8fd8aafb2f4203ba384e31c3ae7cf
|
|
l2-review#4 · os-steve · session_01ADHkmT4eA4YqtxfiPyLPih Contract-review-claim: session_01ADHkmT4eA4YqtxfiPyLPih · head 6b916dc · 2026-11-22T18:52Z |
|
l2-review#4 · os-steve · session_01ADHkmT4eA4YqtxfiPyLPih Contract reviewServed-tier: Check-runs on this head when read (66): 20 success, 9 skipped, 37 still in progress, 0 failed. Green and relevant: Check Changeset, Governed Surface Queue Guard, PR-body guards, Validate Package Dependencies, Spec property liveness, Type Check source gates, Type Check debt ledger, Lint ESLint, Lint docs and code guards, Lint repo and tooling gates, Lint scoped tooling self-tests, Dogfood Regression Gate. Pending, so no verdict yet: Build Core, Test Core 1 to 10, Type Check workspace, Type Check consumer gates, Lint scoped slot lookup and corpus, Lint scoped query-options erasure, Lint PM dispatch-gates, Lint CI release and engine gates, and the UI jobs. This record stands only if those conclude green. ① Derived judgments
② Semver level
Clause-②: yes (widening) — as declared by the lane; judged right and complete. The changeset body does not mention that ③ Boundary flags
④ Design judgment
S1 (should-fix) — The account of the defect does not agree with the tree, and it is written into the contract and both implementing modules. N1 (nit) — N2 (nit) — The peer address does not survive the forward. The own-row caller resolver passes N3 (nit) — N4 (nit) — The three shapes are written twice ( Implemented-by: VERDICT: PASS |
Claude-Session: https://claude.ai/code/session_01ADHkmRY38EZf38Yy3zthbY Co-authored-by: Claude <noreply@anthropic.com>
…ispatcher's ROUTE_NOT_FOUND; the card's ENDPOINT_NOT_FOUND reading is unexplained Claude-Session: https://claude.ai/code/session_01ADHkmRY38EZf38Yy3zthbY Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ADHkmRY38EZf38Yy3zthbY Co-authored-by: Claude <noreply@anthropic.com>
|
l2-review#4 · os-steve · session_01ADHkmT4eA4YqtxfiPyLPih Contract-review-claim: session_01ADHkmT4eA4YqtxfiPyLPih · head e7dcb26 · 2026-11-22T22:07Z |
|
l2-review#4 · os-steve · session_01ADHkmT4eA4YqtxfiPyLPih Contract reviewServed-tier: Delta round on the at-tier record 7084078045 (head Check-runs on this head when read (74): all completed, none failed; 63 success and 11 skipped by reading the list. The runs that were pending on the previous head are now green here: Build Core, Test Core 1 to 10 and its roll-up, Type Check workspace, Type Check consumer gates, Type Check source gates, Type Check debt ledger, Lint ESLint (the parse error at What this head is: ① Derived judgments
② Semver levelUnchanged: Clause-②: yes (widening) — as declared by the lane; judged right and complete. ③ Boundary flags
④ Design judgmentS1: closed — each place the previous record named now states what the tree gives. Read against
Tried to break the rework: a remaining sentence that still gives No must-fix, no should-fix. N1: accepted deviation, now recorded in the changeset and the PR body (the N2: unchanged, accepted as is; a follow-up for the class (the peer address cannot ride a N3: unchanged, accepted as is; the member's doc still calls its 404 "the transport's own unmatched answer" where the transport would give 405 for a known path under another verb. Unreachable from the one caller. N4: unchanged, accepted as is; the three shapes are still written once in plugin-audit and once in runtime, and drift fails closed. N5 (nit) — Implemented-by: VERDICT: PASS |
|
repo:objectstack#2 · os-steve · session_01ADHkmRY38EZf38Yy3zthbY 维护者速读(席位记录 · head
|
|
repo:objectstack#2 · os-steve · session_01ADHkmRY38EZf38Yy3zthbY Landing: L1 ACCEPT at head |
Requested by Steve · project thread
Part of #36469
Clause-②: yes (widening)
Metadata-protocol: none
维护者速读
What changes
The cause is in objectstack, in two layers:
AuditPluginmounted the three comment doors only on the kernel's ownhttp.server, and the runtime dispatcher had no domain for/comments. A hosted tenant kernel owns no socket and registers nohttp.server, soDELETE /api/v1/comments/reactions/:id,PUT /api/v1/comments/:id/resolutionandDELETE /api/v1/comments/:idreached the host'screateHonoAppcatch-all, whosedispatch()had no domain for them, so they answered the dispatcher's404 ROUTE_NOT_FOUND.Premise reading. Cloud confirmed the hosted composition on the card (comment 7084177018, cloud
apps/objectosatab4358642). The rig mountscreateHonoApp({ prefix: '/api/v1' })under theplugin-hono-serverraw app withouter.route('/', inner), after the plugin routes. So an unclaimed/api/v1/comments/**request reaches the dispatcher catch-all, and the new/commentsdomain is reachable on hosted. Unexplained: the card read404with{"code":"ENDPOINT_NOT_FOUND","message":"Not found"}. In this tree only theplugin-hono-servertransport's unmatched answer spells that, and thecreateHonoAppcatch-all answersROUTE_NOT_FOUND. Either the reading predates the pin cloud read, or a layer upstream of the catch-all answered it; that was not measured here. The code text now states the tree's answer (ROUTE_NOT_FOUND) and records this discrepancy instead of the old account.Shape: ruling A on #22438 (record 6079645593, applied to this member of the class; seat scope comment 7081381198). Three segments, one PR.
packages/spec/src/contracts/comment-doors-service.ts): newICommentDoorsServicewith one OPTIONAL, transport-neutral memberhandleCommentDoor(request: Request)answering a promisedResponse, the shapeIWebhookService.handleRedeliverandIApprovalService.handleActionPagealready use.ServiceSlotContractsgainscomments: ICommentDoorsService. No comment service contract existed, so this is the smallest new one. API surface and export-origin snapshots gain the one interface.comment-doors-member.ts,audit-plugin.ts):init()registers thecommentsservice. Its member runs the SAME two registrars (registerCommentReactionRoutes,registerCommentDoorsRoutes) over the same deps as thehttp.servermount, on a privateHonoHttpServerthat never listens, built on first request. The registrar body moved verbatim into a module-levelregisterCommentDoors(http, ctx)that both faces call;mountCommentDoorsis otherwise unchanged, so the raw mount is byte-unchanged and nothing is mounted twice. The no-server branch now logs (info) that the doors are served on thecommentsservice instead of warning that they are unmounted. New dependency:@objectstack/plugin-hono-server.domains/comments.ts, registered inhttp-dispatcher.ts): a/commentssegment domain forPUT/DELETEthat claims exactly the three method and path shapes and forwardscontext.requestwith its body unread (env-scoped spellings are rewritten to the/api/v1wire path). Every other/commentsshape keeps404 ROUTE_NOT_FOUND. No slot, or a slot without the member:501 NOT_IMPLEMENTEDnaming@objectstack/plugin-audit. A consumed body or a throwing member: sanitised 500, logged. No auth-gate or membership-gate exemption. Route ledger: threeserver-onlyrows under domain/comments.scripts/check-route-envelope.mjsdeclarescomments.tsinDISPATCHER_DOMAINS; the dogfood authz matrix classifies the new ledger key (comment-doors-session); the live-mount parity boot pins the three rows as unexercised (that boot composes noAuditPlugin).Overlap: PR #36399 also edits
audit-plugin.ts. This diff stays in the imports, theinit()slot registration,mountCommentDoorsand the newregisterCommentDoorshelper, and touches none of that PR's regions.Out of scope here (filed separately by the seat): the personal-views and attachments doors of the same class.
Tests
Why
Part of, notFixes(seat, on l2-review#4 7086653795 ③): cloud's reading (7084177018) shows that this tree's hosted composition reaches the bridged path. However, the card's own measurement readENDPOINT_NOT_FOUNDwith nomountCommentDoorswarning, which this tree would not produce. So no hosted evidence yet shows that the card's request took this path. #36469 stays open for one hosted live probe after this merges. That probe also checks whether a tenant kernel with no auth service answers 401.Text rework (L2 S1), head
e7dcb26cc4(main merged atf3a8a13cin merge commitacc0d0cd, no rebase): the contract jsdoc,comments.ts,comment-doors-member.ts, the unreact ledger note, the conformance test header and the changeset now state the prior hosted miss as the dispatcher'sROUTE_NOT_FOUND, and the absence promise as neverROUTE_NOT_FOUND(norENDPOINT_NOT_FOUND). The member's ownENDPOINT_NOT_FOUNDfor paths outside its three routes is unchanged. The conformance pin now refuses both miss codes. Readings ate7dcb26cc4:comments.test.ts+route-ledger.conformance.test.ts26/26; conformance 6/6; spec contract tests 12/12.tsc --noEmitexit 0; itscheck:test-typecheckflagged only 3 untouched files with TS2307 on the unbuilt@objectstack/driver-turso. That run was green with the full build in the previous round.604b45ec3(an unescaped apostrophe in the ledger note) is fixed ate7dcb26cc4.check:dual-build-cjs-loadsandcheck:i18n(no whole-workspace dist), andcheck:type-check-debt(its locked closure build queue-timed out). CI runs all three.Earlier readings at head
6b916dcfcunless noted (spec and runtime source unchanged after the noted sha).packages/qa/http-conformance/src/hono-comment-doors.conformance.test.ts(new, the dispatcher-only shape:createHonoApp, nohttp.server, realAuditPlugin, real ObjectQL over sqlite-wasm): 6/6 passed. Covers unreact, resolve then reopen, own-comment delete (200, store follows), byte parity of the anonymous refusal and the refused body between the self-hosted mount and the hosted door, and a typed501 NOT_IMPLEMENTEDper door with nocommentsservice.packages/runtime/src/domains/comments.test.ts(new) +route-ledger.conformance.test.ts: 26/26 passed (at2f6e249ad).@objectstack/plugin-auditfull suite: 109 files, 1794 tests passed (at2f6e249ad).@objectstack/speccomment-doors-service.test.ts+core-service-contracts.test.ts: 12/12 passed; spectypecheck(incl.check:test-typecheck) exit 0.authz-conformance.test.ts+authz-probe-blind-spot.test.ts: 70/70 passed.Red before, green after (two ablations, both restored)
Both via
scripts/ablation-replace.mjs(anchor hit 1 to 0, blob changed, then restored: blob == HEAD andgit diff HEADempty). Both subjects resolve to source (runtime tests import../http-dispatcher.js; http-conformance aliases@objectstack/plugin-audittosrc), so no dist rebuild sits between mutation and reading.http-dispatcher.ts:comments.test.ts10 failed / 3 passed (the door shapes fall to the ordinary miss).ctx.registerService('comments', ...)removed fromaudit-plugin.ts: conformance 4 failed / 2 passed. Unreact, resolve and own-delete answer501 NOT_IMPLEMENTED ... no comments service is registered, and byte parity breaks.Not done: a conformance-level ablation of the runtime domain. That subject reaches the conformance test through
@objectstack/runtime'sdist/and would need a locked rebuild per leg. The unit-level ablation (1) covers the domain.Gates
node scripts/pm/dispatch-gates.mjs --commandsat6b916dcfcderived 135 families. All 135 ran locally;--ranreconciliation: 135 derived, 135 run, 0 unrun.Final pass, non-zero exits only:
check:dual-build-cjs-loadsandcheck:i18nexited 3 (PREREQUISITE NOT MET: unbuilt workspace dist). Both were rerun after the full buildcheck:type-check-debtperformed, and both exited 0.check-self-test-workflow-commands.mjsfailed once withspawnSync node ETIMEDOUTon the loaded box. Rerun: exit 0.Fixed in this PR because a gate caught them:
check:route-ledger-census: 150 to 153.check:test-source-alias: plugin-audit gets an anchored alias for plugin-hono-server, and the domain test imports@objectstack/metadataat module top.check-affected-docs: the runtime door table keyspattern, notpath, so it is not read as a spec API declaration.check:query-options-erasure: the test'sfindOneoptions are typed.Acceptance notes
yes (widening)adds one optional member on one new contract and one new slot key. Nothing is removed or narrowed. A service without the member still satisfies the contract (pinned)./commentsrows enter the route ledger asserver-only, because the gap ratchet is 0. The live-mount parity boot pins them as unexercised, because that boot composes noAuditPlugin.authservice (ctx.getService('auth')), while the dispatcher's identity step can fall back to the host kernel. A tenant kernel with noauthservice of its own would answer 401 after the dispatcher admitted the caller. The webhooks precedent makes the same assumption.@objectstack/plugin-auditnow depends on@objectstack/plugin-hono-serverat runtime (the member's private table is aHonoHttpServer), and thecommentsservice name is taken, so a composition that registers its owncommentsservice besideAuditPluginfails to boot with a duplicate-service error. L2 N2 to N4 are accepted as is.route-ledger-live-mount-parity.dogfood.test.ts. It boots the showcase app, and the box's verify lock never reached this run for that boot. CI's merge-queue dogfood shard runs it.VERDICT command-exit 0). Per the seat's fallback, the scoped vitest and typecheck runs above ran outside the lock, one at a time. A parked slot did not keep its place across re-queues (it reappeared at the back); that is recorded for the seat.Verification
Read first, by risk:
packages/runtime/src/domains/comments.ts:handleCommentsRequest(the three-shape claim, the 501 legs, the body-unread forward).packages/plugins/plugin-audit/src/audit-plugin.ts: theinit()slot registration and the extractedregisterCommentDoors(must equal the old inline body).packages/plugins/plugin-audit/src/comment-doors-member.ts: the private never-listening table.Two-minute check:
pnpm --filter @objectstack/http-conformance exec vitest run --maxWorkers=2 src/hono-comment-doors.conformance.test.tsafter building the closure. Expected: 3 suites green; the unreact, resolve/reopen and own-delete legs answer 200 on a kernel with nohttp.server.🤖 Generated with Claude Code
https://claude.ai/code/session_01ADHkmRY38EZf38Yy3zthbY